package com.example.other.oth;

import gui.ava.html.image.generator.HtmlImageGenerator;

import java.awt.*;

public class Dhtml {
    public static void main(String[] args) {
        HtmlImageGenerator imageGenerator = new HtmlImageGenerator();

//        Dimension dimension = new Dimension();
//        dimension.setSize(500, 500);
//        imageGenerator.setSize(dimension);

        String htmlstr = "<p>商品图片</p></br>\n" +
                "<p>price:156</p>\n" +
                "<img src=\"http://l1.51fanli.net/ocp/?s=320x320&q=100&u=/super/images/2018/12/5c18530d34351.jpg\">";

        imageGenerator.loadHtml(htmlstr);

        imageGenerator.getBufferedImage();

        imageGenerator.saveAsImage("d:/hello-world.png");

        imageGenerator.saveAsHtmlWithMap("hello-world.html", "hello-world.png");

    }
}
